package com.kaka.customviewdemo;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import java.util.Random;

public class MainActivity extends AppCompatActivity {

    private DegreeView dashBoard;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        dashBoard = findViewById(R.id.dash_progress);
        dashBoard.setMax(10000);
        dashBoard.setValue(9000);

    }

    public void changeValue(View view) {
        dashBoard.setValue(new Random().nextInt(10001));

    }
}
